<template>
    <div class="viewPersonalInfo">
            <div>用户名:{{userInfo1.userName}}</div>
            <div>性别:{{sex}}</div>
            <div>手机号:{{userInfo1.phonenumber}}</div>
            <div>邮箱:{{userInfo1.email}}</div>
    </div>
</template>
<script>
import {mapState} from "vuex"
export default {
    name:"ViewPersonalInfo",
    data(){
        return {
            sex:null
        }
    },
    props:{
        userInfo:Object
    },
    created(){
        if(this.userInfo1.sex==0){
            this.sex="男"
        }else{
            this.sex="女"
        }
        // console.log(this.userInfo)
    },
    computed: {
        ...mapState(['userInfo1'])
    }
    
}
</script>

<style lang="less"  scoped>
    .viewPersonalInfo{
        display: flex;
        flex-wrap: wrap;
        padding-left: 50px;
        background: rgb(241, 238, 238);
        div{
            width: 100%;
            padding: 10px 0;
            font-size:14px;
        }
    }
</style>
